<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>部门信息列表</title>
<%@ include file="/common/header/meta.jsp"%>
<%@ include file="/common/header/script.jsp"%>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
<script src="${webRoot}/common/sys_res/index.js" type="text/javascript"></script>
<script type="text/javascript">
	var $dg;
	$(function() {
		var infoContainet = $("#info-containet").empty();
		$.post($.webapp.root + "/admin/system/deptinfo_category/getCategoryByDept.do", {"deptid" : "${USER_SESSION.user.org_id}"}, function(result) {
			
			$.each(result, function(i, item) { 
				var d1 = $("<div></div>").addClass("col-md-6").appendTo(infoContainet) ;
				var d2 = $("<div></div>").addClass("panel panel-primary").appendTo(d1) ;
				var d_title = $("<div></div>").addClass("panel-heading").appendTo(d2) ;
				var sp1 = $("<span></span>").html(item.name).appendTo(d_title);
				var sp2 = $("<span></span>").css("float", "right").css("cursor", "pointer").html("更多").appendTo(d_title);
				var u_list = $("<ul></ul>").addClass("list-group").appendTo(d2) ;
				
				sp1.html(item.name) ;
				sp2.click(function() {
					window.mainpage.addModuleTab({
						title: "质量管理相关事项",
						iniframe: true,
						href: $.webapp.root + "/admin/system/notice/info_main_type_UI.do?type=jd_info"
					});
					
				});
				
				$.post($.webapp.root + "/admin/system/deptinfo_item/view_datagrid.do", {"categoryId" : item.id, rows: 5,sort: "created", order: "desc"}, function(list) {
					$.each(list.rows, function(i, item) {
						var li = $("<li></li>").addClass("list-group-item").appendTo(u_list);
						li.html('<a href="'+$.webapp.root+'/admin/system/deptinfo_item/deptinfo_open_UI.do?id='+item.id+'" target="_blank">'+item.subject+'</a>') ;
					});
				});
			});

		}, 'json');
	});
	
</script>
</head>

<body>
	<div class="container">
	
		<div class="row">
			<div class="col-md-12">
				<br/>
				<div class="pull-right">
					<a href="${ctx}/admin/system/deptinfo_item/deptinfo_open_add_UI.do" target="_blank" class="btn btn-primary">发布文章</a>
				</div>
				<br/><br/>
			</div>
		</div>
		
		<div id="info-containet" class="row">
		
			<div class="col-md-6">
				<div class="panel panel-primary">
					<div class="panel-heading">
						<span>标题</span>
						<span style="float:right;cursor: pointer;" onclick="">更多</span>
					</div>
					<ul class="list-group">
						<li class="list-group-item"><a href="">Cras justo odio</a></li>
						<li class="list-group-item">Dapibus ac facilisis in</li>
						<li class="list-group-item">Morbi leo risus</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Vestibulum at eros</li>
					</ul>
				</div>
			</div>
			
			<div class="col-md-6">
				<div class="panel panel-primary">
					<div class="panel-heading">
						标题
					</div>
					<ul class="list-group">
						<li class="list-group-item">Cras justo odio</li>
						<li class="list-group-item">Dapibus ac facilisis in</li>
						<li class="list-group-item">Morbi leo risus</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Vestibulum at eros</li>
					</ul>
				</div>
			</div>
			
			<div class="col-md-6">
				<div class="panel panel-primary">
					<div class="panel-heading">
						标题
					</div>
					<ul class="list-group">
						<li class="list-group-item">Cras justo odio</li>
						<li class="list-group-item">Dapibus ac facilisis in</li>
						<li class="list-group-item">Morbi leo risus</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Vestibulum at eros</li>
					</ul>
				</div>
			</div>
			
			<div class="col-md-6">
				<div class="panel panel-primary">
					<div class="panel-heading">
						标题
					</div>
					<ul class="list-group">
						<li class="list-group-item">Cras justo odio</li>
						<li class="list-group-item">Dapibus ac facilisis in</li>
						<li class="list-group-item">Morbi leo risus</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Porta ac consectetur ac</li>
						<li class="list-group-item">Vestibulum at eros</li>
					</ul>
				</div>
			</div>
			


			<!-- <div class="col-md-6">
				<ul class="list-group">
					<li class="list-group-item">Cras justo odio</li>
					<li class="list-group-item">Dapibus ac facilisis in</li>
					<li class="list-group-item">Morbi leo risus</li>
					<li class="list-group-item">Porta ac consectetur ac</li>
					<li class="list-group-item">Vestibulum at eros</li>
				</ul>
			</div> -->

		</div>
	</div>

	<!-- <div class="wel_box">
 		<h1 class="welcome">部门信息一览</h1>
	</div>
	<div id="index_box">
  		<div class="center_box">
  			<div class="centext_box">
  				<h3 class="title">技术与生产性专栏<span id="proj_info_more">更多</span><span id="proj_info_icon">&nbsp;</span></h3>
  				<div class="list1" id="proj_info">
  				</div>
  			</div>
  			<div class="centext_box">
  				<h3 class="title">项目总结<span id="sqa_info_more">更多</span><span id="sqa_info_icon">&nbsp;</span></h3>
  				<div class="list1" id="sqa_info"> 
  				</div>
  			</div>
  		</div>
  		
  		<div class="center_box">
  			<div class="centext_box" style="height:180px;">
  				<h3 class="title">项目管理相关事项<span id="cb_info_more">更多</span><span id="cb_info_icon">&nbsp;</span></h3>
  				<div class="list1" id="cb_info" style="height:150px;">
  				</div>
  			</div>
  			<div class="centext_box" style="height:180px;">
  				<h3 class="title">质量管理相关事项<span id="jd_info_more">更多</span><span id="jd_info_icon">&nbsp;</span></h3>
  				<div class="list1" id="jd_info" style="height:150px;"> 
  				</div>
  			</div>
  		</div>
  		
  		<div class="center_box">
  			<div class="centext_box" style="height:180px;">
  				<h3 class="title">系统版本发布<span id="zl_info_more">更多</span><span id="zl_info_icon">&nbsp;</span></h3>
  				<div class="list1" id="zl_info" style="height:150px;">
  				</div>
  			</div>
  			<div class="centext_box" style="height:180px;">
  				<h3 class="title">其他事项<span id="other_info_more">更多</span><span id="other_info_icon">&nbsp;</span></h3>
  				<div class="list1" id="other_info" style="height:150px;"> 
  				</div>
  			</div>
  		</div>
  		
  	</div> -->


</body>
</html>